#include "EvolutionOfCreatures.h"

namespace jcrada {

    EvolutionOfCreatures::EvolutionOfCreatures( int population_size ) :
    _population_size( population_size ),
    _creatures( new Creature*[population_size] ),
    _evaluation_time( 10 ) {
        for (int i = 0; i < getPopulationSize(); ++i) {
            setCreature(i, NULL);
        }
    }

    EvolutionOfCreatures::~EvolutionOfCreatures( ) {
        for (int i = 0; i < getPopulationSize(); ++i) {
            if (_creatures[i]) {
                delete _creatures[i];
            }
        }
        delete [] _creatures;
    }
}
